﻿using ProduceBasicData.Domain.InvoiceAndReceiptManage.Enum;

namespace ProduceBasicData.Api.DTO.InvoiceAndReceiptDto
{
    /// <summary>
    /// 到票DTO
    /// </summary>
    public class ReceiptDto
    {
        /// <summary>
        /// 主键id
        /// </summary>
        public int Id { get; set; }

        /// <summary>
        /// 到票单号（系统生成唯一标识，如H20250114003653140027）
        /// </summary>
        public string? SytemNo { get; set; }

        /// <summary>
        /// 到票主题（如物料采购0021）
        /// </summary>
        public string? ReceiptSubject { get; set; }

        /// <summary>
        /// 到票日期
        /// </summary>
        public DateTime? ReceiptDate { get; set; }

        /// <summary>
        /// 开票方（采购发票的开具方，如食品供应商）
        /// </summary>
        public string? InvoiceIssuer { get; set; }

        /// <summary>
        /// 发票号
        /// </summary>
        public string? InvoiceNo { get; set; }

        /// <summary>
        /// 是否绑定采购订单（true：绑定采购订单到票；false：不绑定采购订单到票）
        /// </summary>
        public bool IsBindPurchaseOrder { get; set; }

        /// <summary>
        /// 采购编码（关联的采购订单编码，如XSDD264846、XSD0264846）
        /// </summary>
        public string? PurchaseCode { get; set; }

        /// <summary>
        /// 采购主题（关联的采购订单名称，如物料采购0021）
        /// </summary>
        public string? PurchaseSubject { get; set; }

        /// <summary>
        /// 供应商名称（关联的采购供应商名称）
        /// </summary>
        public string? SupplierName { get; set; }

        /// <summary>
        /// 采购日期（关联采购订单的创建日期）
        /// </summary>
        public DateTime? PurchaseDate { get; set; }

        /// <summary>
        /// 入库状态（关联采购订单的入库情况，如已完成入库）
        /// </summary>
        public string? InboundStatus { get; set; }

        /// <summary>
        /// 已付款金额（关联采购订单的已支付金额）
        /// </summary>
        public decimal? PaidAmount { get; set; }

        /// <summary>
        /// 已到票金额
        /// </summary>
        public decimal? ReceivedAmount { get; set; }

        /// <summary>
        /// 到票状态
        /// </summary>
        public ReceiptStatus Status { get; set; }

        /// <summary>
        /// 创建人
        /// </summary>
        public string? CreateName { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreateTime { get; set; }

        /// <summary>
        /// 更新人
        /// </summary>
        public string? UpdateName { get; set; }

        /// <summary>
        /// 更新时间
        /// </summary>
        public DateTime? UpdateTime { get; set; }

        /// <summary>
        /// 是否删除
        /// </summary>
        public bool Isdel { get; internal set; }
    }
}
